package com.example.movie.utils

import com.alibaba.fastjson.JSON
import com.alibaba.fastjson.JSONArray

object JsonUtil {

    fun <T> parseObject(obj: Any, cls: Class<T>): T? {
        return JSON.parseObject(JSON.toJSONString(obj), cls);
    }

    fun <T> parseArrayObject(obj: Any, cls: Class<T>): MutableList<T>? {
        return JSONArray.parseArray(JSON.toJSONString(obj), cls);
    }


}